Client devices often use HTTP to send and receive data to and from the client device. During such communication exchanges, the client device will send a HTTP GET request for an object located on a remote network device. In a typical HTTP communication, the client device sends all associated headers with the HTTP GET request.
However, network connections for internet-enabled client devices are often asymmetric, so the bandwidth provided to the device for uploading data is lower than the bandwidth provided to the device for downloading data. Therefore, a 1 KB HTTP header in a HTTP GET request may take as much time to upload as 20 KB of HTTP response data takes to download. The actual difference between upload time and download time may be even greater since HTTP request headers are not sent as compressed data, and HTTP response data is often sent as compressed data, so 20 KB of compressed data sent across the network may comprise, for example, 50 KB of uncompressed data at the client device. When a client device sends a HTTP GET request for a small object such as, but not limited to, a 10 KB image, the time it takes to send the request header data may account for a majority of the time it takes to receive the image.
Client device HTTP stacks send an Accept-Encoding header with value gZip for all HTTP GET requests. The Accept-Encoding header indicates that the client accepts compressed content and indirectly asks the server to send the requested object as a gZip compressed object. In such a manner, the amount of content which is transferred over the network is reduced, thereby reducing the time it takes to download the object over the network to the client device. However, since some objects such as, but not limited to, images, are already encoded, compressing such files would not reduce file size and therefore HTTP servers don't compress such files even though the HTTP client device sends the Accept-Encoding:gZip header. Other file types whose size is not reduced upon compression are videos, audios and flash objects. Therefore, sending this header for these content types does not improve the response time, but may actually increase the time to send the request packet.